package com.example.inerface;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.text.TextUtils;

import androidx.annotation.Nullable;

import impl.BankBossActionImpl;
import impl.BankWorker;
import impl.NormalUserImpl;

public class BankService extends Service {
    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        String action=intent.getAction();
        if(!TextUtils.isEmpty(action)){
            if("com.Service.ACTION_NOEMAL_USER".equals(action))
            {
                return new NormalUserAIDLActionImpl();
            }
            else if("com.Service.ACTION_BANK_WORKER".equals(action))
            {
                return new BankWorker();
            }
            else if("com.Service.ACTION_BANK_BOSS".equals(action)){
                return new BankBossActionImpl();
            }
        }

        return null;
    }
}
